CREATE TABLE [dbo].[TDCOMP_PERC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_COMP_PERC] [dbo].[TD_VC_020] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCOMP_PE__NU_SE__42EDA74D] DEFAULT ((0)),
[TI_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU] [dbo].[TD_VC_020] NOT NULL,
[FE_EMIS] [dbo].[TD_DT_001] NOT NULL,
[IM_TOTA_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_PE__IM_TO__43E1CB86] DEFAULT ((0)),
[IM_PERC_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCOMP_PE__IM_PE__44D5EFBF] DEFAULT ((0)),
[IM_PAGO_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCOMP_PE__IM_PA__45CA13F8] DEFAULT ((0)),
[IM_COMP_PAGO] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCOMP_PE__IM_CO__46BE3831] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PE__CO_US__47B25C6A] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PE__FE_US__48A680A3] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCOMP_PE__CO_US__499AA4DC] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCOMP_PE__FE_US__4A8EC915] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PERC] ADD CONSTRAINT [PK__TDCOMP_P__8A5B741940113AA2] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_COMP_PERC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCOMP_PERC] ADD CONSTRAINT [FK__TDCOMP_PERC__550C5788] FOREIGN KEY ([CO_EMPR], [NU_COMP_PERC]) REFERENCES [dbo].[TCCOMP_PERC] ([CO_EMPR], [NU_COMP_PERC])
GO
ALTER TABLE [dbo].[TDCOMP_PERC] ADD CONSTRAINT [FK__TDCOMP_PERC__56007BC1] FOREIGN KEY ([CO_EMPR], [NU_COMP_PERC]) REFERENCES [dbo].[TCCOMP_PERC] ([CO_EMPR], [NU_COMP_PERC])
GO
